package com.anxin.service.impl;

import com.anxin.entity.SysRole;
import com.anxin.mapper.SysRoleMapper;
import com.anxin.service.SysRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;

@Service
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {

    @Override
    public List<SysRole> getRolesByUserId(String userId) {
        // TODO: 实现通过用户ID查询角色列表的逻辑
        return null;
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public void updateRoleStatus(String roleId, Integer status) {
        SysRole role = new SysRole();
        role.setId(roleId);
        role.setStatus(status);
        this.updateById(role);
    }
} 